Object.defineProperty(exports, "__esModule", {
    value: !0
}), exports.getSwipeDirection = exports.getPointsDistance = exports.isNearbyPoints = exports.isEqualPoints = exports.getPointsNumber = exports.getTouchPoints = void 0, 
exports.getTouchPoints = function(t) {
    var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0, o = t.touches[e] || t.changedTouches[e];
    return {
        x: o.pageX,
        y: o.pageY
    };
}, exports.getPointsNumber = function(t) {
    return t.touches && t.touches.length || t.changedTouches && t.changedTouches.length;
}, exports.isEqualPoints = function(t, e) {
    return t.x === e.x && t.y === e.y;
}, exports.isNearbyPoints = function(t, e) {
    var o = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 25;
    return Math.abs(t.x - e.x) < o & Math.abs(t.y - e.y) < o;
}, exports.getPointsDistance = function(t, e) {
    var o = Math.abs(t.x - e.x), s = Math.abs(t.y - e.y);
    return Math.sqrt(o * o + s * s);
}, exports.getSwipeDirection = function(t, e, o, s) {
    return Math.abs(t - e) >= Math.abs(o - s) ? t - e > 0 ? "Left" : "Right" : o - s > 0 ? "Up" : "Down";
};